package org.ysu.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.ysu.mapper.ClueMapper;
import org.ysu.pojo.CCadre;

import org.ysu.service.CCadreService;
import org.ysu.mapper.CCadreMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
* @author libaoyu
* @description 针对表【c_cadre】的数据库操作Service实现
* @createDate 2024-06-17 14:59:55
*/
@Service
public class CCadreServiceImpl extends ServiceImpl<CCadreMapper, CCadre>
    implements CCadreService{
    @Resource
    private CCadreMapper cCadreMapper;

    @Override
    public CCadre getByIdNumber(String idNumber) {
        LambdaQueryWrapper<CCadre> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(CCadre::getIdnumber, idNumber);
        CCadre cCadre = cCadreMapper.selectOne(wrapper);
        return cCadre;
    }

    @Override
    public CCadre selectByIdNumber(String idNumber ) {
        System.out.println("idNumber:"+idNumber);
        System.out.println(cCadreMapper.selectByIdNumber(idNumber));
        return cCadreMapper.selectByIdNumber(idNumber);

    }
}




